<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import = "com.db4o.ext.ExtObjectContainer" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "com.db4o.query.*" %>

<% session.removeAttribute("editPconti"); %>
<% SessionFacade sfacade = new SessionFacade(session); %>
<% session.setAttribute("sfacade",sfacade) ; %>
<% String id = request.getParameter("id"); %> 
  
<c:if test="${!empty param.id}">
	<%  Object pconti = sfacade.getById(id); %>
	<%  session.setAttribute("editPconti",pconti); %>
</c:if>

<c:if test="${empty param.id}">
	<%  session.setAttribute("editPconti",new PianoDeiConti()); %>
	<jsp:setProperty name="editPconti" property="*" />
	<jsp:setProperty name="editPconti" property="circolo" value="${userBean.circolo}" />
	
</c:if>
<jsp:forward page="edit.jsp" />